/************************************************************************
                        DataContainerLogic.h.h - Copyright asaf

**************************************************************************/


#ifndef DATACONTAINERLOGIC_H
#define DATACONTAINERLOGIC_H

#include <string>
#include "../Shered/Reply.h"
#include "../Shered/Request.h"
#include "Data.h"
#include "Course.h"
/**
  * class DataContainerLogic
  * main data logic.
  *	acts a distributor of incoming msgs to the proper subroutines in data.
  * intermidiator between DataContainer and Data
  */

class DataContainerLogic
{
public:

		// Constructors/Destructors
		//  
		
		/**
		 * the only constractor.
		 * param d Data to be used (comes from creator/controller)
		 */
		DataContainerLogic (Data & d):data(d){;}

		/**
		 * Empty Destructor
		 */
		virtual ~DataContainerLogic ( );



		/**
		 * main func.
		 * acts a distributor of incoming msgs to the proper subroutines in data.
		 * @return Reply outgoing formatted msgs from Data
		 * @param  request incoming msgs
		 */
		virtual auto_ptr<Reply> executeRequest (const Request &request);



private:

		// Constructors/Destructors
		//  
		
		/**
		 * Empty Constructor (deprecated)
		 */
		DataContainerLogic ( );

		/**
		 * copy ctor (deprecated)
		 */
		DataContainerLogic(const DataContainerLogic&);


		/**
		 * copy operator (deprecated)
		 */
		DataContainerLogic &operator=(const DataContainerLogic &rhs);

		//refarnce to data (created at creator of this)
		Data &data;

		



};

#endif // DATACONTAINERLOGIC_H
